/**
    ATClab - scriptable Air Traffic Control simulations.
    Copyright (C) 2010 openatclab@gmail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/

#include "writer.h"
#include "data.h"
#include <iostream>
#include <map>
#include <string>
#include <vector>

using namespace performance;

////////////////////////////////////////////////////////////////////////////////
//
// performance::Writer
// 
//------------------------------------------------------------------------------
// [public] interface
//

/*!
 *
 */
void Writer::write( DataCPtr & ) const {
	throw;
/*	
	std::cout << "****************************" << std::endl;
	std::cout << "*****  Aircraft Types  *****" << std::endl;
	std::cout << "****************************" << std::endl;

	PDTMap::const_iterator tit= data->_type.begin();
	for ( ; tit != data->_type.end(); ++tit ) {
		
		const PDT *pdt = tit->second;

		std::cout 
			 << "TYPE: " << pdt->type 
			 <<    " : " << pdt->wtc 
			 <<    " : " << pdt->syMSC 
			 <<    " : " << pdt->bnMSC
			 <<    " : " << pdt->classRef
			 << std::endl;

	}

	std::cout << "******************************" << std::endl;
	std::cout << "*****  Performance Data  *****" << std::endl;
	std::cout << "******************************" << std::endl;

	PDOMap::const_iterator dit = data->_performance.begin();
	for ( ; dit != data->_performance.end(); ++dit ) {
		
		const PDO *pdo = dit->second;

		std::cout 
			 << "PERORMANCE: " << pdo->classNo
			 <<          " : " << pdo->is_jet 
			 <<          " : " << pdo->xSection
			 <<          " : " << pdo->levels
			 <<          " : " << pdo->sidStar
			 << std::endl;

		std::vector< double >::const_iterator vit;

		std::cout << " ***** altitude >>>>> : ";
		for ( vit = pdo.altitude->begin() ; vit != pdo.altitude->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;

		std::cout << " ***** climb rate >>>>> : ";
		for ( vit = pdo.climbRate->begin() ; vit != pdo.climbRate->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;

		std::cout << " ***** descemt rate >>>>> : ";
		for ( vit = pdo.descendRate->begin() ; vit != pdo.descendRate->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;

		std::cout << " ***** acceleration >>>>> : ";
		for ( vit = pdo.acceleration->begin() ; vit != pdo.acceleration->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;

		std::cout << " ***** deceleration >>>>> : ";
		for ( vit = pdo.deceleration->begin() ; vit != pdo.deceleration->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;

		std::cout << " ***** cruise speed >>>>> : ";
		for ( vit = pdo.cruiseSpeed->begin() ; vit != pdo.cruiseSpeed->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;

		std::cout << " ***** stall speed >>>>> : ";
		for ( vit = pdo.stallSpeed->begin() ; vit != pdo.stallSpeed->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;

		std::cout << " ***** climb speed >>>>> : ";
		for ( vit = pdo.climbSpeed->begin() ; vit != pdo.climbSpeed->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;

		std::cout << " ***** descendSpeed >>>>> : ";
		for ( vit = pdo.descendSpeed->begin() ; vit != pdo.descendSpeed->end() ; ++vit )
			std::cout << *vit << " : ";
		std::cout << "<<<<<" << std::endl;
	}
*/
}


////////////////////////////////////////////////////////////////////////////////
